package com.epsi.bowling.core.bo;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="partie")
public class Partie {
  @Id
  @GeneratedValue(strategy=GenerationType.AUTO)
  @Column(name="id")
  protected Integer id;
  
  @Column(name="dateHeureDebut", nullable=false)
  protected String dateHeureDebut;
  
  @Column(name="dateHeureFin", nullable=false)
  protected String dateHeureFin;
  
  @Column(name="statut", nullable=false)
  protected String statut;

  @ManyToOne
  @JoinColumn(name="idPiste", referencedColumnName="id")
  protected Piste piste;
  
  @OneToOne
  @JoinColumn(name="idReservation", referencedColumnName="id")
  protected Reservation reservation;
  
  
  @OneToMany(mappedBy="partie", targetEntity=Joueur.class)
  private List listJoueur;
 
  public Partie() {}

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDateHeureDebut() {
        return dateHeureDebut;
    }

    public void setDateHeureDebut(String dateHeureDebut) {
        this.dateHeureDebut = dateHeureDebut;
    }

    public String getDateHeureFin() {
        return dateHeureFin;
    }

    public void setDateHeureFin(String dateHeureFin) {
        this.dateHeureFin = dateHeureFin;
    }

    public String getStatut() {
        return statut;
    }

    public void setStatut(String statut) {
        this.statut = statut;
    }

    public Piste getPiste() {
        return piste;
    }

    public void setPiste(Piste piste) {
        this.piste = piste;
    }


    public Reservation getReservation() {
        return reservation;
    }

    public void setReservation(Reservation reservation) {
        this.reservation = reservation;
    }

    public List getListJoueur() {
        return listJoueur;
    }

    public void setListJoueur(List listJoueur) {
        this.listJoueur = listJoueur;
    }

    
  
}